package edu.zut.bailan.cart.service.impl;

import edu.zut.bailan.base.service.impl.GenericManagerImpl;
import edu.zut.bailan.cart.dao.CartRemarkDao;
import edu.zut.bailan.cart.domain.CartRemark;
import edu.zut.bailan.cart.service.CartRemarkManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class CartRemarkManagerImpl extends GenericManagerImpl<CartRemark,Long>
        implements CartRemarkManager {

    CartRemarkDao cartRemarkDao;

    @Autowired
    public void setCartRemarkDao(CartRemarkDao cartRemarkDao) {
        this.cartRemarkDao = cartRemarkDao;
        this.dao = this.cartRemarkDao;
    }

    @Override
    public List list() {
        List list = new ArrayList();
        for (int i = 0; i < 100; i++) {
            CartRemark cart = new CartRemark();
            cart.setCode("cart_"+i);
            cart.setContent("cart_content_"+i);
            cart.setEntityName("edu.zut.hb.fortune");
            list.add(cart);
        }
        return list;
    }

}